#列表生成式
l=['alex_dsb','lxx_dsb','wxx_dsb','xxq_dsb','egon']
new_l=[]
for name in l:
    if name.endswith('dsb'):
        new_l.append(name)
print(new_l)

############################
l=['alex_dsb','lxx_dsb','wxx_dsb','xxq_dsb','egon']
#条件成立时加入的值:第一个name，
new_l=[name for name in l if name.endswith('dsb')]

print(new_l)
